import request from "@/utils/request";
export const register = function (data) {
    return request('/user/register', "post", data)
}
export const login = function (data) {
    return request('/user/login', "post", data)
}
export const findAll = function (data) {
    return request('/user/findAll', "post", data)
}
export const getRoles = function () {
    return request('/user/roles', "get")
}

export const deleteById = function (id) {
    return request('/user/deleteById', "get", { id })
}
export const search = function (stuNo) {
    return request('/user/search', "get", { stuNo })
}

export const searchUserName = function (username) {
    return request('/user/searchUserName', "get", { username })
}
export const registerCount = function () {
    return request('/user/registerCount', "get")
}

export const getDifferentSchoolCount = function () {
    return request('/user/getDifferentSchoolCount', "get")
}
export const update = function (data) {
    return request('/user/update', "post", data)
}
export const getById = function (id) {
    return request('/user/getById', "get", { id })
}
export const uploadAvatar = function (data) {
    return request('/user/uploadAvatar', "post", data, { 'Content-Type': 'multipart/form-data' },)
}
